package net.wangds.dymodel.meta.entity;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import net.wangds.data.TableCateEnum;
import net.wangds.data.TableTypeEnum;
import net.wangds.data.ann.ColumnDef;
import net.wangds.data.ann.TableDef;
import net.wangds.data.impl.IdCreateDisable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * .
 * <p></p>
 *
 * @author 王东石 2021/2/15 20:19.
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
@Entity
@Table(name="dy_model_def")
@EqualsAndHashCode(callSuper = true)
@TableDef(
        beanClass = "net.wangds.dymodel.meta.entity.DyModelDefEntity",
        displayName = "问题专家库",
        tableType = TableTypeEnum.RowOriented,
        category = TableCateEnum.Master
)
public class DyModelDefEntity extends IdCreateDisable {

    @ColumnDef(displayname = "英文名称")
    @ApiModelProperty("英文名称")
    @Column(length=200)
    private String nameEn;

    @ColumnDef(displayname = "中文名称")
    @ApiModelProperty("中文名称")
    @Column(length=200)
    private String nameCn;

    @ColumnDef(displayname = "uuid编码")
    @ApiModelProperty("uuid编码")
    @Column(length=36)
    private String code;

    @ColumnDef(displayname = "uuid编码的无‘-’格式")
    @ApiModelProperty("uuid编码的无‘-’格式")
    @Column(length=36)
    private String compactCode;

    @ColumnDef(displayname = "说明")
    @ApiModelProperty("说明")
    @Column(length=1000)
    private String remark;

    @ColumnDef(displayname = "表名")
    @ApiModelProperty("表名")
    @Column(length=200)
    private String tablename;

    @ColumnDef(displayname = "方案名")
    @ApiModelProperty("方案名")
    @Column(name = "schm", length=50)
    private String schema;

    @ColumnDef(displayname = "sql别名")
    @ApiModelProperty("sql别名")
    @Column(length=50)
    private String aliasBase;

}
